package com.pn.config;

import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;





@Configuration
public class Swagger2Config {
    @Bean
    public Docket docket(){
        Docket docket = new Docket(DocumentationType.SWAGGER_2);
        ApiInfo apiInfo = new ApiInfoBuilder()
                .title("动力恒合仓库")
                .description("前后端分离项目，前端vue，后端springboot")
                .version("1.0")
                .build();
        docket.apiInfo(apiInfo);
        docket = docket.select().apis(RequestHandlerSelectors.
                basePackage("com.pn.controller")).build();
        return docket;
    }



















}
